import { sendRequest } from '@/http';

const baseUrl = '/admin/inst';

/**
 * 查询机构站点列表
 * @param params
 * @returns
 */
export const queryInstStations = (page = 1, pageSize = 100) => {
  return sendRequest({
    url: `${baseUrl}/queryInstStations`,
    method: 'get',
    params: {
      page,
      pageSize,
    },
  });
};

export const queryInstStations2 = (params: any) => {
  return sendRequest({
    url: `${baseUrl}/queryInstStations`,
    method: 'get',
    params,
  });
};

/**
 * 创建机构站点
 * @param station
 * @returns
 */
export const createInstStation = (station: any) => {
  return sendRequest({
    url: `${baseUrl}/createInstStation`,
    method: 'post',
    data: station,
  });
};

/**
 * 修改机构站点
 * @param station
 * @returns
 */
export const updateInstStation = (station: any) => {
  return sendRequest({
    url: `${baseUrl}/updateInstStation`,
    method: 'post',
    data: station,
  });
};

/**
 * 站点下拉选项
 * @returns
 */
export const queryInstStationOptions = () => {
  return sendRequest({
    url: `${baseUrl}/queryInstStationOptions`,
    method: 'get',
  });
};
